class Sound:
  def __init__(self, soundPath):
    self.soundPath = soundPath
    self.pygame_mixer_sound = None
    try:
      import pygame.mixer
      self.pygame_mixer_sound = pygame.mixer.Sound(soundPath)
    except Exception as e:
      print('[warn]Sound.e=', e, soundPath)

  def play(self):
    if self.pygame_mixer_sound is not None:
      self.pygame_mixer_sound.play()
    else:
      import subprocess
      subprocess.call('play-audio {}'.format(self.soundPath), shell=True)

